package com.ruoyi.web.controller.travel;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.travel.domain.TravelIndexPicture;
import com.ruoyi.travel.service.ITravelIndexPictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

import static com.ruoyi.common.core.domain.AjaxResult.success;

@RestController
@RequestMapping("/travel/indexPicture")
public class TravelIndexPictureController {
    @Autowired
    private ITravelIndexPictureService travelIndexPictureService;
    /**
     * 获取订单状态统计数据
     *
     * @return 包含各状态订单数量的结果
     */

    @GetMapping
    public AjaxResult getOrderStatusCount() {

        TravelIndexPicture travelIndexPicture=new TravelIndexPicture();
        travelIndexPicture.setClientSourceCount(travelIndexPictureService.getClientSourceCount());
        travelIndexPicture.setOrderStatusCount(travelIndexPictureService.getOrderStatusCount());
        travelIndexPicture.setDesignerOrderData(travelIndexPictureService.getDesignerOrderData());
        travelIndexPicture.setMonthlyOrderStats(travelIndexPictureService.getMonthlyOrderStats());
        travelIndexPicture.setMonthlyConsultCount(travelIndexPictureService.getMonthlyConsultCount());
        System.out.println(travelIndexPicture);
        return success(travelIndexPicture);
    }
}
